package com.dg.lecheng.api.user.repo;

import com.dg.lecheng.api.base.repo.ApiRepository;
import com.dg.lecheng.api.user.model.InfoAuth;
import com.dg.lecheng.base.core.repo.CrudRepo;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 由MyBatis Generator工具自动生成，请不要手动修改
 */
@ApiRepository
public interface InfoAuthDao extends CrudRepo<InfoAuth, Integer> {
    public List<InfoAuth> getListByNameAndCode(@Param("name") String name, @Param("code") String code, PageBounds pageBounds);

    public int getCountByNameAndCode(@Param("name") String name, @Param("code") String code);

    public List<InfoAuth> findByName(@Param("name") String name, PageBounds pageBounds);

    public List<Map<String,Object>> getListForZtree();

    public List<Map<String,Object>> findRoleAuthByRoleIdAndUserId(@Param("userId") int userId, @Param("roleId") int roleId);

    public List<Map<String,Object>> findRoleAuthByRoleId(@Param("roleId") int roleId);

    public List<Map<String,Object>> findParentElement(int type);
}